POV-Ray : Newsgroups : povray.newusers : Adding transparency to several objects after they've been defined : Adding transparency to several objects after they've been defined Server Time
28 Jul 2024 18:17:52 EDT (-0400)
  Adding transparency to several objects after they've been defined  
From: Josh VW
Date: 16 Jan 2008 00:45:00
Message: <web.478d98ed277aa08f49e5cfeb0@news.povray.org>
Hi all,
  If I have a large, complex object and want to render a series of images with
different sub-objects faded out (made semi-transparent), is there a best way to
do that?  In my case, I am trying to highlight different parts of a laser table
with lots of lenses and mirrors, but you could imagine having an engine
or clock and then fading out everything but one particular gear assembly at a
time.

I basically have a scene file that looks like this:

---------------------------------------------------------------
#include "colors.inc"

#declare Std_Texture = texture { pigment { color Blue} };

#macro big_optic (xpos, ypos, height)
  //this will actually be a mirror/lens/etc
  box { <0,0,0> <1,1,height>
        texture {Std_Texture}
        translate <xpos,ypos,0>
  }
#end

//part 1 of laser table
big_optic (2,3,4)
big_optic (5,6,3)

//part 2
big_optic(-1,4,3)
big_optic(-3,0,2)


camera{
  location <0, -10, 5>
  look_at <0, 0, 0 >
}
background { color White }
light_source { <5,-10,5>, color White}

------------------------------------------------------

and I would like to add transparency to the optics in part 1 or part 2.  I could
just redefine Std_Texture between sections, but in reality I have big_optic_1,
big_optic_2, etc, and each may use several texures.  I would like to be able to
do something like add "transmit 0.9" to everything within a block.

Sorry for such a long question, and thanks for any help you can give.

-Josh


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.